package cn.oa.service.impl;

import cn.oa.dao.DepartmentDao;
import cn.oa.dao.PositionMapper;
import cn.oa.entity.Position;
import cn.oa.service.PositionService;
import cn.oa.util.DatabaseUtil;
import cn.oa.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
@Service
public class PositionServiceImpl implements PositionService {

    @Resource
    PositionMapper positionMapper;
    @Override
    public List<Position> getAllPositions() throws SQLException {
        try{
            return positionMapper.getAllPositions();
        }catch(SQLException e){
            e.printStackTrace();
            throw e;
        }
    }
}
